package com.hdu.dwh.service.cube_service;

import java.util.Set;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hdu.dwh.dtos.cube_dtos.CubeDimensionDto;
import com.hdu.dwh.dtos.cube_dtos.CuboidMetricDto;
import com.hdu.dwh.dtos.cube_dtos.FilterDto;
import com.hdu.dwh.pojos.DimensionFilter;
import com.hdu.dwh.pojos.DimensionPivot;
import com.hdu.dwh.pojos.MetricFilter;
import com.hdu.dwh.pojos.cube_pojos.Cube;
import com.hdu.dwh.pojos.cube_pojos.CubeDimension;
import com.hdu.dwh.pojos.cube_pojos.CubeMetric;
import com.hdu.dwh.pojos.cube_pojos.Cuboid;
import com.hdu.dwh.pojos.cube_pojos.Filter;
import com.hdu.dwh.pojos.source_access_pojos.DataWarehouseDatabase;
import com.hdu.dwh.vos.CubeVo;

public interface CubeService extends IService<Cube> {
    void saveMertics(Set<CubeMetric> metrics);

    Set<Cuboid> buildCuboids(Cube cube, Set<CubeDimension> dimensions);

    void saveCubeDimensions(Set<CubeDimension> dimensions);

    CubeVo queryCubeDetail(Cube cube);

    void saveFilters(Set<Filter> filters);

    CubeVo createCube(Cube cube, Set<CubeDimensionDto> dimensions, Set<CuboidMetricDto> metrics, Set<FilterDto> filters);

    void deleteCube(Cube cube);

    String getCuboidSQL(Cuboid cuboid, Set<DimensionFilter> filters, Set<MetricFilter> metricFilters, Set<DimensionPivot> pivots, Integer pageNum, Integer pageSize, String sqlExecutor) throws Exception;

    String getCuboidSQL(Cuboid cuboid, Set<DimensionFilter> filters, Integer pageNum, Integer pageSize, String sqlExecutor) throws Exception;

    Cuboid queryCuboidDetail(Cuboid cuboid);

    void saveCuboid(Cuboid cuboid, DataWarehouseDatabase saveDatabase, String saveTableName,String description) throws Exception;

    void deleteCuboid(Cuboid cuboid);

    String getSavedCuboidSQL(Cuboid cuboid, Set<DimensionFilter> dimensionFilter, Set<DimensionPivot> pivots, Integer pageNum, Integer pageSize, String string) throws Exception;

    void deleteCuboidByTableId(Long tableId);


}
